package com.one.group.user.service;

import com.one.group.model.dto.SpHouseRentalAddDto;
import com.one.group.model.dto.SpHouseRentalQueryDto;
import com.one.group.model.entity.*;
import com.one.group.model.vo.SpHouseRentalListVo;
import com.one.group.model.vo.SpHouseVo;

import java.util.List;

public interface HouseCacheService {

    /**
     * 根据小区id查询楼栋类型
     * @param cellId 小区id
     * @return 楼栋类型
     */
    List<SpBuildingtype> getBuildingTypeByCellId(Long cellId);

    /**
     * 根据楼栋类型id查询楼栋
     * @param BuildingTypeId 楼栋类型id
     * @return 楼栋
     */
    List<SpBuilding>getBuildingByType(Long BuildingTypeId);

    /**
     * 根据楼栋id查询单元
     * @param BuildingId 楼栋id
     * @return 单元
     */
    List<SpUnit> getUnitByBuilding(Long BuildingId);

    /**
     * 根据单元id查询房屋
     * @param UnitId 单元id
     * @return 房屋
     */
    List<SpHouse> getHouseByUnitId(Long UnitId);

    void deleteBuildingTypeCache(Long cellId);

    void deleteBuildingCache(Long BuildingTypeId);

    void deleteAllHouseCache();

    void deleteHouseCache(Long UnitId);

    List<SpHouse> getHouseByOwnerId(Long ownerId);

    SpHouseVo getHouseById(Long houseId);

    boolean rentHouse(SpHouseRentalAddDto spHouseRentalAddDto);

    SpHouseRental chackHouseIsRent(Long houseId);

    List<SpHouseRentalListVo> listSpHouseRentals(SpHouseRentalQueryDto spHouseRentalQueryDto);
}
